_Pragma("once")

#include <filesystem>

#include "SingletonTemplate.h"
#include "LoopControlInfo.h"

class TimedLoopCommandManager{
    friend class SingletonTemplate<TimedLoopCommandManager>;
    public:

        /** Default destructor */
        ~TimedLoopCommandManager();


        LoopControlInfoPtr load(const DateTimeUtility::ClockTime_t& time);

        LoopControlInfoPtr load();

        bool save(LoopControlInfoPtr& ploopControlInfo);

        static LoopControlInfoPtr& getDefaultTimedInfo(LoopControlInfoPtr& loopControlInfoPtr);

        bool clear();

    protected:
                /** Default constructor */
        TimedLoopCommandManager();
        TimedLoopCommandManager(const TimedLoopCommandManager&) = delete;
        TimedLoopCommandManager(TimedLoopCommandManager&&) = delete;


        LoopControlInfoPtr mptimedLoopCommand;
        std::filesystem::path mpath;
};


using TimedLoopCommandManagerSingleton = SingletonTemplate<TimedLoopCommandManager>;
